//一次性AT k1编辑 2020.5.24

private ["_unit", "_L", "_wh", "_shape", "_h", "_dir"];
_unit = _this select 0;
_wh = objNull;
sleep 2;
_L = secondaryWeapon _unit;

switch _L do {
	case "launch_NLAW_F": {_shape = "A3\weapons_F\launchers\nlaw\nlaw_F.p3d"; _h = .1};
	case "CUP_launch_NLAW": {_shape = "CUP\Weapons\CUP_Weapons_NLAW\CUP_NLAW.p3d"; _h = .08};
	case "CUP_launch_M136": {_shape = "CUP\Weapons\CUP_Weapons_M136\CUP_m136.p3d"; _h = .07};
	case "CUP_launch_RPG18": {_shape = "CUP\Weapons\CUP_Weapons_RPG18\CUP_rpg18.p3d"; _h = .04};
	default {_shape = ""};
};

if (_shape == "") exitWith {};
_wh = createSimpleObject [_shape, [0,0,0]];
_dir = getDir _unit;
_relPos = _unit getPos [1, _dir];
if (getPosATL _unit select 2 < .1) then [{_relPos set [2, (_relPos select 2) + _h]; _wh setPosATL _relPos},{_relPos set [2, (getPosASL _unit select 2) + _h]; _wh setPosASL _relPos}];
_unit removeWeaponGlobal _L;
_wh setDir _dir;
if (isServer) then [{sleep 120; deleteVehicle _wh},{CRS_delete_wh = _wh; publicVariableServer "CRS_delete_wh"}];

